<?php /* Smarty version 2.6.20, created on 2012-08-10 15:13:19
         compiled from _core/_include/module/_mvc/view/icontainerreceipt.tpl */ ?>
function IContainerReceipt(container, item, options) {
  this._container = container;
  this._item = item;
  this._options = options;
  
  this._orderTrackId = (options && options.track) ? options.track : [];
  
  this._createElements();
};
IContainerReceipt.prototype._createElements = function() {
  var gui, div, table, mtr, mtd, input,  unique = MiscUtils.unique();
  DOMUtils.removeChildElements(this._container);
  
  var table = document.createElement('table');
  table.style.width = '900px';
  table.style.height = '160px';
  table.cellPadding = 0;
  table.cellSpacing = 0;
  this._container.appendChild(table);
  
  for (var i = 0, il = this._orderTrackId.length; i < il; i++) {
    tr = table.insertRow(-1);
    td = tr.insertCell(-1);
    td.style.verticalAlign = 'middle';
    td.style.width = '900px';
    td.align = 'center';
    var itable = document.createElement('table');
    itable.style.width = '860px';
    itable.style.height = '50px';
    itable.cellPadding = 0;
    itable.cellSpacing = 0;
    td.appendChild(itable);
    
    itr = itable.insertRow(-1);
    itd = itr.insertCell(-1);
    itd.align = 'left';
    itd.style.verticalAlign = 'middle';
    itd.style.width = '860px';
    itd.style.height = '25px';
    var span = document.createElement('span');
    span.style.fontSize = '140%';
    span.style.fontWeight = 'bold';
    span.style.color = '#663333';
    span.id = unique + '_' + i + '_ordertype_div';
    itd.appendChild(span);
    var date = document.createElement('span');
    date.style.fontSize = '13px';
    date.id = unique + '_' + i + '_date_div';
    date.style.margin = '0 0 0 10px';
    itd.appendChild(date);

    itr1 = itable.insertRow(-1);
    itd1 = itr1.insertCell(-1);
    itd1.align = 'left';
    itd1.style.verticalAlign = 'middle';
    itd1.style.width = '860px';
    itd1.style.height = '25px';
    var span = document.createElement('span');
    span.style.fontSize = '14px';
    span.style.color = '#663333';
    span.id = unique + '_' + i + '_package_div';
    itd1.appendChild(span);

    itr1 = itable.insertRow(-1);
    itd1 = itr1.insertCell(-1);
    itd1.align = 'left';
    itd1.style.verticalAlign = 'middle';
    itd1.style.width = '860px';
    itd1.style.height = '25px';
    var span = document.createElement('span');
    span.style.fontSize = '14px';
    span.style.color = '#663333';
    span.id = unique + '_' + i + '_vpackage_div';
    itd1.appendChild(span);


    itr11 = itable.insertRow(-1);
    itd11 = itr11.insertCell(-1);
    itd11.align = 'left';
    itd11.style.verticalAlign = 'middle';
    itd11.style.width = '860px';
    itd11.style.height = '25px';
    var span = document.createElement('span');
    span.style.fontSize = '14px';
    span.style.color = '#663333';
    span.id = unique + '_' + i + '_addpackage_div';
    itd11.appendChild(span);    


    /*itr111 = itable.insertRow(-1);
    itd111 = itr111.insertCell(-1);
    itd111.align = 'left';
    itd111.style.verticalAlign = 'middle';
    itd111.style.width = '860px';
    itd111.style.height = '25px';*/
    
    
    tr = table.insertRow(-1);
    td = tr.insertCell(-1);
    td.align = 'left';
    td.style.verticalAlign = 'middle';
    td.style.width = '900px';
    td.style.height = '35px';
    var table1 = document.createElement('table');
    table1.style.width = '900px';
    table1.style.height = '35px';
    table1.style.backgroundColor = '#ebebeb';
    table1.cellPadding = 0;
    table1.cellSpacing = 0;
    td.appendChild(table1);
    
    tr1 = table1.insertRow(-1);
    td1 = tr1.insertCell(-1);
    td1.style.width = '78px';
    td1.style.height = '30px';
    td1.align = 'left';
    td1.style.paddingLeft = '20px';
    td1.style.verticalAlign = 'middle';
    td1.style.fontWeight = 'bold';
    td1.style.color = '#663333';
    td1.style.fontSize = '120%'
    td1.appendChild(document.createTextNode('SUB-Total Price'));
    
    td1 = tr1.insertCell(-1);
    td1.style.width = '245px';
    td1.style.height = '30px';
    td1.style.borderRight = 'solid 2px #fff';
    var span1 = document.createElement('span');
    span1.style.fontWeight = 'bold';
    span1.style.fontSize = '14px';
    span1.id = unique + '_' + i + '_price_div';
    td1.appendChild(span1);
    var span2 = document.createElement('span');
    span2.style.color = '#663333';
    span2.id = unique + '_' + i + '_discount_div';
    span2.style.fontSize = '13px';
    span2.style.fontWeight = 'bold';
    td1.appendChild(span2);
    
    td1 = tr1.insertCell(-1);
    td1.style.width = '110px';
    td1.style.height = '30px';
    td1.align = 'left';
    td1.style.paddingLeft = '20px';
    td1.style.verticalAlign = 'middle';
    td1.style.fontWeight = 'bold';
    td1.style.color = '#663333';
    td1.style.fontSize = '120%'
    td1.appendChild(document.createTextNode('SUB-Total Received'));
    
    td1 = tr1.insertCell(-1);
    td1.style.width = '70px';
    td1.style.height = '30px';
    td1.style.fontSize = '14px';
    td1.style.fontWeight = 'bold';
    td1.color = '#000';
    td1.align = 'left';
    td1.style.verticalAlign = 'middle';
    td1.style.borderRight = 'solid 2px #fff';
    td1.id = unique + '_' + i + '_received_div';
    
    td1 = tr1.insertCell(-1);
    td1.style.width = '110px';
    td1.style.height = '30px';
    td1.align = 'left';
    td1.style.paddingLeft = '20px';
    td1.style.verticalAlign = 'middle';
    td1.style.fontWeight = 'bold';
    td1.style.color = '#663333';
    td1.style.fontSize = '120%'
    td1.appendChild(document.createTextNode('SUB-Total Anticipated'));
    
    td1 = tr1.insertCell(-1);
    td1.style.width = '80px';
    td1.style.height = '30px';
    td1.style.fontSize = '14px';
    td1.style.fontWeight = 'bold';
    td1.color = '#000';
    td1.align = 'left';
    td1.style.verticalAlign = 'middle';
    td1.id = unique + '_' + i + '_anticipated_div';
    
    tr = table.insertRow(-1);
    td = tr.insertCell(-1);
    td.style.height = '10px';
    
    tr = table.insertRow(-1);
    td = tr.insertCell(-1);
    td.align = 'center';
    td.style.verticalAlign = 'middle';
    td.style.width = '900px';
    td.style.height = '100px';
    var table2 = document.createElement('table');
    table2.style.width = '860px';
    table2.style.height = '100px';
    table2.cellPadding = 0;
    table2.cellSpacing = 0;
    td.appendChild(table2);
    

    var tr2 = table2.insertRow(-1);
    var td2 = tr2.insertCell(-1);
    td2.style.width = '960px';
    td2.style.height = '30px';
    td2.align = 'center';
    td2.style.verticalAlign = 'middle';
    var table15 = document.createElement('table');
    table15.cellPadding = 0;
    table15.cellSpacing = 0;
    table15.style.width = '560px';
    td2.appendChild(table15);
    tr15 = table15.insertRow(-1);
    td15 = tr15.insertCell(-1);
    td15.align = 'center';
    td15.style.width = '160px';
    td15.style.fontWeight = 'bold';
    td15.style.paddingLeft = '140px';
    td15.style.fontSize = '110%';
    td15.style.color = '#663333';
    td15.style.whiteSpace = 'nowrap';
    td15.style.verticalAlign = 'middle';
    td15.appendChild(document.createTextNode('System Calculate'));

    
    td15 = tr15.insertCell(-1);
    td15.align = 'left';
    td15.style.fontWeight = 'bold';
    td15.style.paddingLeft = '60px';
    td15.style.color = '#663333';
    td15.style.verticalAlign = 'middle';
    td15.appendChild(document.createTextNode('Actual Residue'));

    td15 = tr15.insertCell(-1);
    td15.align = 'left';
    td15.style.fontWeight = 'bold';
    td15.style.paddingRight = '4px';
    td15.style.color = '#663333';
    td15.style.verticalAlign = 'middle';
    td15.appendChild(document.createTextNode(''));    
    
    
    td2 = tr2.insertCell(-1);
    td2.style.width = '528px';
    td2.style.height = '30px';
    td2.align = 'left';
    td2.style.fontWeight = 'bold';
    td2.style.color = '#663333';
    td2.style.verticalAlign = 'middle';
    td2.appendChild(document.createTextNode('Actual Paid'));  
    
    
    
    
    
    var tr2 = table2.insertRow(-1);
    tr2.id = unique + '_' + i + '_container1_div';
    var td2 = tr2.insertCell(-1);
    td2.style.width = '960px';
    td2.style.height = '30px';
    td2.align = 'left';
    td2.style.verticalAlign = 'middle';
    var table5 = document.createElement('table');
    table5.cellPadding = 0;
    table5.cellSpacing = 0;
    table5.style.width = '560px';
    td2.appendChild(table5);
    tr5 = table5.insertRow(-1);
    td5 = tr5.insertCell(-1);
    td5.align = 'left';
    td5.style.width = '160px';
    td5.style.fontWeight = 'bold';
    td5.style.fontSize = '110%';
    td5.style.color = '#663333';
    td5.style.whiteSpace = 'nowrap';
    td5.style.verticalAlign = 'middle';
    td5.appendChild(document.createTextNode('Deposit'));
    var span = document.createElement('span');
    span.style.fontWeight = 'normal';
    span.style.fontSize = '90%';
    span.appendChild(document.createTextNode(' (Non-Refundable)'));
    td5.appendChild(span);
    
    td5 = tr5.insertCell(-1);
    td5.align = 'left';
    td5.style.color = '#663333';
    td5.style.verticalAlign = 'middle';
    td5.id = unique + '_' + i + '_rate1_div';

    td5 = tr5.insertCell(-1);
    td5.align = 'left';
//    td5.style.paddingLeft = '20px';
    td5.style.color = '#663333';
    td5.style.verticalAlign = 'middle';
    td5.id = unique + '_' + i + '_rate11_div';       
    
    td2 = tr2.insertCell(-1);
    td2.style.width = '500px';
    td2.style.height = '30px';
    td2.align = 'left';
    td2.style.verticalAlign = 'middle';
    td2.id = unique + '_' + i + '_pay1_div';
    
    tr2 = table2.insertRow(-1);
    tr2.id = unique + '_' + i + '_container2_div';
    td2 = tr2.insertCell(-1);
    td2.style.width = '960px';
    td2.style.height = '30px';
    td2.align = 'left';
    td2.style.verticalAlign = 'middle';
    var table6 = document.createElement('table');
    table6.cellPadding = 0;
    table6.cellSpacing = 0;
    table6.style.height = '30px';
    table6.style.width = '560px';
    td2.appendChild(table6);
    tr6 = table6.insertRow(-1);
    td6 = tr6.insertCell(-1);
    td6.align = 'left';
    td6.style.width = '160px';
    td6.style.fontWeight = 'bold';
    td6.style.fontSize = '110%';
    td6.style.color = '#663333';
    td6.style.verticalAlign = 'middle';
    td6.appendChild(document.createTextNode('2'));
    var span = document.createElement('span');
    span.style.verticalAlign = 'super';
    span.style.fontSize = '80%';
    span.appendChild(document.createTextNode('nd'));
    td6.appendChild(span);
    td6.appendChild(document.createTextNode(' Payment'));
    
    td6 = tr6.insertCell(-1);
    td6.style.fontWeight = '10px';
    td6.align = 'left';
//    td6.style.paddingLeft = '20px';
    td6.style.color = '#663333';
    td6.style.verticalAlign = 'middle';
    td6.id = unique + '_' + i + '_rate2_div';

    td6 = tr6.insertCell(-1);
    td6.style.fontWeight = '10px';
    td6.align = 'left';
    td6.style.color = '#663333';
    td6.style.verticalAlign = 'middle';
    td6.id = unique + '_' + i + '_rate22_div';    
    
    
    td2 = tr2.insertCell(-1);
    td2.style.width = '528px';
    td2.style.height = '30px';
    td2.align = 'left';
    td2.style.verticalAlign = 'middle';
    td2.id = unique + '_' + i + '_pay2_div';
    
    tr2 = table2.insertRow(-1);
    tr2.id = unique + '_' + i + '_container3_div';
    td2 = tr2.insertCell(-1);
    td2.style.width = '960px';
    td2.style.height = '30px';
    td2.align = 'left';
    td2.style.verticalAlign = 'middle';
    var table7 = document.createElement('table');
    table7.cellPadding = 0;
    table7.cellSpacing = 0;
    table7.style.width = '560px';
    td2.appendChild(table7);
    tr7 = table7.insertRow(-1);
    td7 = tr7.insertCell(-1);
    td7.align = 'left';
    td7.style.fontWeight = 'bold';
    td7.style.fontSize = '110%';
    td7.style.color = '#663333';
    td7.style.width = '160px';
    td7.style.verticalAlign = 'middle';
    td7.appendChild(document.createTextNode('3'));
    var span = document.createElement('span');
    span.style.verticalAlign = 'super';
    span.style.fontSize = '80%';
    span.appendChild(document.createTextNode('rd'));
    td7.appendChild(span);
    td7.appendChild(document.createTextNode(' Payment'));

    td7 = tr7.insertCell(-1);
    td7.style.fontWeight = '10px';
    td7.align = 'left';
    td7.style.color = '#663333';
    td7.style.verticalAlign = 'middle';
    td7.id = unique + '_' + i + '_rate3_div';
    
    
    td7 = tr7.insertCell(-1);
    td7.style.fontWeight = '10px';
    td7.align = 'left';
//    td7.style.paddingLeft = '20px';
    td7.style.color = '#663333';
    td7.style.verticalAlign = 'middle';
    td7.id = unique + '_' + i + '_rate33_div';    
    
    
    
    td2 = tr2.insertCell(-1);
    td2.style.width = '528px';
    td2.style.height = '30px';
    td2.align = 'left';
    td2.style.verticalAlign = 'middle';
    td2.id = unique + '_' + i + '_pay3_div';
    
    tr2 = table2.insertRow(-1);
    tr2.id = unique + '_' + i + '_container4_div';
    td2 = tr2.insertCell(-1);
    td2.style.width = '240px';
    td2.style.height = '30px';
    td2.align = 'left';
    td2.style.verticalAlign = 'middle';
    var table8 = document.createElement('table');
    table8.cellPadding = 0;
    table8.cellSpacing = 0;
    table8.style.width = '560px';
    td2.appendChild(table8);
    tr8 = table8.insertRow(-1);
    td8 = tr8.insertCell(-1);
    td8.align = 'left';
    td8.style.width = '160px';
    td8.style.fontWeight = 'bold';
    td8.style.fontSize = '110%';
    td8.style.color = '#663333';
    td8.style.verticalAlign = 'middle';
    td8.appendChild(document.createTextNode('4'));
    var span = document.createElement('span');
    span.style.verticalAlign = 'super';
    span.style.fontSize = '80%';
    span.appendChild(document.createTextNode('th'));
    td8.appendChild(span);
    td8.appendChild(document.createTextNode(' Payment'));
    
    td8 = tr8.insertCell(-1);
    td8.style.fontWeight = '10px';
    td8.align = 'left';
    td8.style.color = '#663333';
    td8.style.verticalAlign = 'middle';
    td8.id = unique + '_' + i + '_rate4_div';
    
    td8 = tr8.insertCell(-1);
    td8.style.fontWeight = '10px';
    td8.align = 'left';
//    td8.style.paddingLeft = '20px';
    td8.style.color = '#663333';
    td8.style.verticalAlign = 'middle';
    td8.id = unique + '_' + i + '_rate44_div';    
    
    
    td2 = tr2.insertCell(-1);
    td2.style.width = '518px';
    td2.style.height = '30px';
    td2.align = 'left';
    td2.style.verticalAlign = 'middle';
    td2.id = unique + '_' + i + '_pay4_div';
    
    tr2 = table2.insertRow(-1);
    td2 = tr2.insertCell(-1);
    td2.style.width = '860px';
    td2.colSpan = 2;
    td2.align = 'center';
    var table3 = document.createElement('table');
    table3.style.width = '860px';
    table3.style.height = '30px';
    table3.cellPadding = 0;
    table3.cellSpacing = 0;
    table3.style.margin = '5px 0 0 0';
    td2.appendChild(table3);
    
    tr3 = table3.insertRow(-1);
    td3 = tr3.insertCell(-1);
    td3.style.width = '165px';
    td3.style.height = '30px';
    td3.align = 'left';
    td3.style.verticalAlign = 'middle';
    td3.style.fontWeight = 'bold';
    td3.style.fontSize = '110%';
    td3.style.color = '#663333';
    td3.appendChild(document.createTextNode('Your next payment due:'));
    td3 = tr3.insertCell(-1);
    td3.style.height = '30px';
    td3.align = 'left';
    td3.style.fontSize = '14px';
    td3.style.fontWeight = 'bold';
    td3.style.color = 'red';
    td3.style.verticalAlign = 'middle';
    td3.id = unique + '_' + i + '_paydue_div';
    
    
    tr3 = table3.insertRow(-1);
    td3 = tr3.insertCell(-1);
    td3.style.width = '165px';
    td3.style.height = '30px';
    td3.align = 'left';
    td3.style.verticalAlign = 'middle';
    td3.style.fontWeight = 'bold';
    td3.style.fontSize = '110%';
    td3.style.color = '#663333';
    td3.id = unique + '_' + i + '_refunddiv'; 
    td3 = tr3.insertCell(-1);
    td3.style.height = '30px';
    td3.align = 'left';
    td3.style.fontSize = '14px';
    td3.style.fontWeight = 'bold';
    //td3.style.color = 'red';
    td3.style.verticalAlign = 'middle';
    td3.id = unique + '_' + i + '_refund_div';    
    
    
    if (i < this._orderTrackId.length -1) {
      tr = table.insertRow(-1);
      td = tr.insertCell(-1);
      td.align = 'left';
      td.style.verticalAlign = 'middle';
      td.style.width = '900px';
      td.style.height = '30px';
      var table4 = document.createElement('table');
      table4.style.width = '900px';
      table4.style.height = '20px';
      table4.cellPadding = 0;
      table4.cellSpacing = 0;
      td.appendChild(table4);
      
      tr4 = table4.insertRow(-1);
      td4 = tr4.insertCell(-1);
      td4.align = 'left';
      td4.style.verticalAlign = 'middle';
      td4.style.height = '20px';
      var line = document.createElement('img');
      line.src = 'images/common/line.png';
      td4.appendChild(line);
    }
  }
  var gui = GuiContainerReceipt.instance(unique, this._orderTrackId);
  new HandleContainerReceipt(gui, this._item, this._options);
  
};